package cn.com.thinker.security.example.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import cn.com.thinker.security.sdk.sso.handler.impl.DefaultClientLoginHandlerImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


@Controller
@RequestMapping("/a")
public class HomeAction {

	@RequestMapping("/home")
	public ModelAndView home(HttpServletRequest request, HttpSession session){
		ModelAndView mv = new ModelAndView("home");
		mv.addObject("user", session.getAttribute(DefaultClientLoginHandlerImpl.USER_KEY));
		return mv;
	}

}